package dxc04;

public class demo1 {
    //利用Lock方法

    public static void main(String[] args) {
        //1.创建线程对象
        MyThread t1 = new MyThread();
        MyThread t2 = new MyThread();
        t1.setName("窗口1");
        t2.setName("窗口2");
        //2.启动线程

        t1.start();

        t2.start();
    }
}
